const timeDistance = function(value) {
    //  传入时间戳
    let nowt = Math.round(new Date() / 1000)
    let times = (nowt - value)
    if (times > 31536000) {`在这里插入代码片`
      return `${parseInt(times / 31536000)}年前`
    } else if (times >= 86400 && times < 31536000) {
      return `${parseInt(times / 86400)}天前`
    } else if (times >= 3600 && times < 86400) {
      return `${parseInt(times / 3600)}小时前`
    } else if (times > 60 && times < 3600) {
      return `${parseInt(times / 60)}分钟前`
    } else if (times < 60) {
      return '刚刚'
    }
  }
  export default timeDistance
  